import { createRouter, createWebHistory } from 'vue-router'
import BatchCenter from '../views/BatchCenter.vue'
import MatchingWorkbench from '../views/MatchingWorkbench.vue'
import DictionaryMaintenance from '../views/DictionaryMaintenance.vue'
import GlobalSearch from '../views/GlobalSearch.vue'
import ApiTest from '../components/ApiTest.vue'

const routes = [
  {
    path: '/',
    redirect: '/batch-center',
  },
  {
    path: '/batch-center',
    name: 'BatchCenter',
    component: BatchCenter,
  },
  {
    path: '/matching-workbench/:batchId?',
    name: 'MatchingWorkbench',
    component: MatchingWorkbench,
  },

  {
    path: '/dictionary',
    name: 'DictionaryMaintenance',
    component: DictionaryMaintenance,
  },
  {
    path: '/global-search',
    name: 'GlobalSearch',
    component: GlobalSearch,
  },
  {
    path: '/api-test',
    name: 'ApiTest',
    component: ApiTest,
  },
]

const router = createRouter({
  history: createWebHistory(),
  routes,
})

export default router
